package com.example.demo.entity;

import java.time.LocalDateTime;

/**
 * 文章标签实体类
 * 对应数据库tags表
 */
public class Tag {
    
    /**
     * 标签ID，主键
     */
    private Long id;
    
    /**
     * 标签名称
     */
    private String name;
    
    /**
     * 标签颜色
     */
    private String color;
    
    /**
     * 使用次数
     */
    private Integer articleCount;
    
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    
    // 无参构造器
    public Tag() {
    }
    
    // 全参构造器
    public Tag(Long id, String name, String color, Integer articleCount, LocalDateTime createTime) {
        this.id = id;
        this.name = name;
        this.color = color;
        this.articleCount = articleCount;
        this.createTime = createTime;
    }
    
    // Getter和Setter方法
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getColor() {
        return color;
    }
    
    public void setColor(String color) {
        this.color = color;
    }
    
    public Integer getArticleCount() {
        return articleCount;
    }
    
    public void setArticleCount(Integer articleCount) {
        this.articleCount = articleCount;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
}
